\documentclass{ctexart}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pifont}

\title{第六次课堂作业}

\author{邵柯欣 \\学号：3200103310 \\课程名称：数据科学的数学基础}

\begin{document}
\maketitle

\section{Question 1： Prove the distance induced by Rogers-Tanimoto similarity (on page 77) is a metric.}
Rogers-Tanimoto:
\begin{align}
  s_{RT}(A,B) =& s_{1,1,0,2}(A,B) \notag \\
  =& \dfrac{|A \cap B| + |\overline{A \cup B}|}{|A \cap B| + |\overline{A \cup B} + 2*|A \bigtriangleup B|} \notag
\end{align}
Define $d(A,B) = 1 - s_{RT}(A,B)$.\\
\ding{172} non-negativity\\
$\because$ $|\overline{A \cup B}| = |\Omega| - |A \cup B|$ and $|A \bigtriangleup B| = |A \cup B| - |A \cap B|$\\
$\therefore$ $s_{RT}(A,B) = \dfrac{|\Omega| - |A \bigtriangleup B|}{|\Omega| + |A \bigtriangleup B|} \Rightarrow s_{RT}(A,B) \in [0, 1]$\\
$\therefore$ $d(A,B) = 1 - s_{RT} \in [0,1]$\\
Thus $d(A,B) \ge 0$, $\forall A,B \in \Omega$.\\
\ding{173} identity\\
since $d(A,B) = 1 - s_{RT} = \dfrac{2*|A \bigtriangleup B|}{|\Omega| + |A \bigtriangleup B|}$,\\
hence 
\begin{align}
  d(A,B) = 0 &\iff |A \bigtriangleup B| = 0 \notag \\
  &\iff |A \cup B| = |A \cap B| \notag \\
  &\iff A = B \notag
\end{align}
Thus $d(a,b) = 0$ if and only if $a = b$.\\
\ding{174} symmetry\\
$d(A,B) = \dfrac{2*|A \bigtriangleup B|}{|\Omega| + |A \bigtriangleup B|}, d(B,A) = \dfrac{2*|B \bigtriangleup A|}{|\Omega| + |B \bigtriangleup A|}$\\
$\because$ $|A \bigtriangleup B| = |B \bigtriangleup A|$\\
$\therefore$ $d(A,B) = d(B,A)$\\
Thus $d(A,B) = d(B,A), \forall A,B \in \Omega$.\\
\ding{175} triangle inequality\\
\begin{align}
  d(A,C) + d(C,B) &= \dfrac{2*|A \bigtriangleup C|}{|\Omega| + |A \bigtriangleup C|} + \dfrac{2*|C \bigtriangleup B|}{|\Omega| + |C \bigtriangleup B|} \notag \\
  &\ge \dfrac{2*|A \bigtriangleup C|}{|\Omega| + |A \bigtriangleup C| + |C \bigtriangleup B|} + \dfrac{2*|C \bigtriangleup B|}{|\Omega| + |A \bigtriangleup C| + |C \bigtriangleup B|} \notag \\
  &= \dfrac{2*(|A \bigtriangleup C| + |C \bigtriangleup B|)}{|\Omega| + |A \bigtriangleup C| + |C \bigtriangleup B|} \notag \\
  &= \dfrac{2}{\dfrac{|\Omega|}{|A \bigtriangleup C| + |C \bigtriangleup B|} + 1} \notag
\end{align}
$\because$ $|A \bigtriangleup C| + |C \bigtriangleup B| \ge |A \setminus C| + |C \setminus B| \ge |A \bigtriangleup B|$\\
$\therefore$ $d(A,C) + d(C,B) \ge \dfrac{2}{\dfrac{|\Omega|}{|A \bigtriangleup C|} + 1} = d(A,B)$\\
Thus $s_{RT}$ satisfies triangle inequality.\\
In conclusion, the distance induced by Rogers-Tanimoto similarity is a metric.
 
\section{Question 2: Show that the distance induced by Sorensen-Dice similarity (on page 77) is not a metric.}
Sorensen-Dice:
\begin{align}
  s_{Dice}(A,B) =& s_{2,0,0,1}(A,B) \notag \\
  =& \dfrac{2*|A \cap B|}{2*|A \cap B| + |A \bigtriangleup B|} \notag 
\end{align}
Define $d(A,B) = 1 - s_{Dice}(A,B)$.\\
Let $A = \{a\}, B = \{b\}, C = \{a, b\}$,\\
then $s_{Dice}(A, B) = 1, s_{Dice}(A, C) = \frac{1}{3}, s_{Dice}(C, B) = \frac{1}{3}$\\
$\iff d(A, B) = 1 > d(A, C) + d(B, C) = \frac{2}{3}$.\\
Thus the distance induced by Sorensen-Dice does not satisfy triangle inequality.\\
In conclusion, the distance induced by Sorensen-Dice similarity is not a metric.

\end{document}
